package com.petc.api.service.client;

import com.petc.api.service.PetcOrderApiConstants;
import com.petc.api.service.param.OrderCreateParam;
import feign.Headers;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import javax.validation.Valid;


@FeignClient(name = PetcOrderApiConstants.SERVICE_NAME, contextId = "orderClient")
public interface OrderClient {


    @PostMapping(PetcOrderApiConstants.ORDER_CREATE)
    @Headers("Content-Type: application/json")
    void createOrder(@Valid @RequestBody OrderCreateParam param);
}
